package Link;

import java.util.Scanner;

public class Pink5 {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		 int []DK={9,2,5,7,8};
		 int a1=DK[0];
		 int b1=DK[1];
		 int c1=DK[3];
		 for (int i = 0; i < DK.length; i++) {
			 DK[0]=DK[4];
			 DK[1]=c1;
			 DK[4]=a1;
			 DK[3]=b1;
			
		}
		 for (int i = 0; i < DK.length; i++) {
				 System.out.println(DK[i]);
		}
	}
}
